#ifndef CONFIGFILEMANAGER_H
#define CONFIGFILEMANAGER_H

#include "../fileProcess/fileprocess.h"

#include <QObject>
#include <QColor>
#include <QJsonDocument>
#include <QJsonObject>
#include <QDir>
#include <QDebug>
#include <QFile>
#include <QCoreApplication>
#include <QResource>

class ConfigFileManager : public QObject
{
    Q_OBJECT
public:
    explicit ConfigFileManager(QObject *parent = nullptr);

    bool createJson(QDir cachedir);
    bool createConf(QDir cachedir);
    bool createSavePathConfig();
    bool modifyRadiusJson(int radius,QString jsonFilePath);

    bool modifyAccentColorConf(QColor accentcolor,QString confFilePath);
    bool modifyQtAccentColorConf(QString accentcolor,QString confFilePath);
    bool modifyWallPaperConf(QString wallpaperpath,QString confFilePath);
    bool modifyWidgetStyleConf(QString WidgetStyle,QString confFilePath);
    bool modifyTransparencyConf(int transparency,QString confFilePath);
    bool modifywindowRadiusConf(int windowradius,QString confFilePath);

    bool modifySavePathConf(QString savePath);

    bool copyFileContent(const QString& sourceFilePath, const QString& destinationFilePath);
    bool copyIcontoCacheDir(QMap<QString, QString> *map,QDir cachedir);

    void copyPictoCacheDir(const QString& destinationFilePath,QDir cachedir,QString type);
    void copyPicstoCacheDir(const QString& destinationFilePath,QDir cachedir);
    void copyMp4toCacheDir(const QString& destinationFilePath,QDir cachedir);
    void copyAllPictoCacheDir(const QDir sourcedir,QDir cachedir);
signals:
    void updateInfo();
    void updateThumbnail(QString thumbnailPath);
private:

};

#endif // CONFIGFILEMANAGER_H
